package assets.skins
{
	import mx.skins.ProgrammaticSkin;

	public class VScrollBarThumbSkin extends ProgrammaticSkin
	{
		public function VScrollBarThumbSkin()
		{
			super();
		}
		
		override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
		{
			super.updateDisplayList(unscaledWidth, unscaledHeight);
			
			// background
			graphics.clear();
			graphics.beginFill(0xFFFFFF);
			graphics.drawRect(-15, 0, 15, unscaledHeight);
			graphics.endFill();
			
			// hilight
			graphics.beginFill(0xF5F5F5);
			graphics.drawRect(-7, 0, 8, unscaledHeight);
			graphics.endFill();
			
			// left side line
			graphics.beginFill(0xC9C9C9);
			graphics.drawRect(-15, 0, 1, unscaledHeight);
			graphics.endFill();
			
			// middle drag-lines
			graphics.lineStyle(1, 0xC5C5C5, 1, false);
			
			if (unscaledHeight > 15)
			{
				graphics.moveTo(-11, int(unscaledHeight/2)-4);
				graphics.lineTo(-3,  int(unscaledHeight/2)-4);
				
				graphics.moveTo(-11, int(unscaledHeight/2)+4);
				graphics.lineTo(-3,  int(unscaledHeight/2)+4);
			}
			
			graphics.moveTo(-11, int(unscaledHeight/2));
			graphics.lineTo(-3,	 int(unscaledHeight/2));
			
			
			graphics.lineStyle(1, 0xF8F8F8, 0.3, false);

			if (unscaledHeight > 15)
			{
				graphics.moveTo(-11, int(unscaledHeight/2)-3);
				graphics.lineTo(-3,	 int(unscaledHeight/2)-3);
				
				graphics.moveTo(-11, int(unscaledHeight/2)+5);
				graphics.lineTo(-3,	 int(unscaledHeight/2)+5);	
			}
			
			graphics.moveTo(-11, int(unscaledHeight/2)+1);
			graphics.lineTo(-3,	 int(unscaledHeight/2)+1);
			
		}
		
	}
}